<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<script>
	document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = doIt;
	
	var moved;
	var mousex;
	var mousey;
	
	function doIt(e) {
		document.getElementById("mousex").value = e.pageX;
		document.getElementById("mousey").value = e.pageY;
	}
	
	document.addEventListener ("mousemove", mouseTracker, false);
	
function mouseTracker(evt) {
if (!evt)
	evt = window.event;

if (mousex == evt.clientX &&
			mousey == evt.clientY)
	{
	moved = false;
	return;
	}
mousex  = evt.clientX;
mousey = evt.clientY;
moved = true;

document.getElementById("mousex").value = mousex;
document.getElementById("mousey").value = mousey;
window.status = "("+mousex+", "+mousey+")"
return false;
}
	
	//function getMouseXY(e) { tempX = e.pageX; tempY = e.pageY; }  
  //if (tempX < 0){tempX = 0;} if (tempY < 0){tempY = 0;}
</script>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Untitled Document</title>
	</head>
	<body onmousemove="doIt();">
		here is text<br><br><br><br><br><br><br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<form>x: <input type="text" id="mousex" onClick="doIt();"><br>Y: <input type="text" id="mousey"></form>
	</body>
</html>

